package com.ruoyi.bluebera.mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.ruoyi.bluebera.domain.BizExchangeRates;

/**
 * 汇率记录Mapper接口
 * 
 * @author ruoyi
 * @date 2025-07-27
 */
public interface BizExchangeRatesMapper 
{
    /**
     * 查询汇率记录
     * 
     * @param id 汇率记录主键
     * @return 汇率记录
     */
    public BizExchangeRates selectBizExchangeRatesById(Long id);


    public BigDecimal selectAvgRateOfLatest4();

    public BizExchangeRates selectLatestExchangeRate();

    public BizExchangeRates selectClosestExchangeRate(Date createdAt);
    /**
     * 查询汇率记录列表
     * 
     * @param bizExchangeRates 汇率记录
     * @return 汇率记录集合
     */
    public List<BizExchangeRates> selectBizExchangeRatesList(BizExchangeRates bizExchangeRates);

    /**
     * 新增汇率记录
     * 
     * @param bizExchangeRates 汇率记录
     * @return 结果
     */
    public int insertBizExchangeRates(BizExchangeRates bizExchangeRates);

    /**
     * 修改汇率记录
     * 
     * @param bizExchangeRates 汇率记录
     * @return 结果
     */
    public int updateBizExchangeRates(BizExchangeRates bizExchangeRates);

    /**
     * 删除汇率记录
     * 
     * @param id 汇率记录主键
     * @return 结果
     */
    public int deleteBizExchangeRatesById(Long id);

    /**
     * 批量删除汇率记录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBizExchangeRatesByIds(Long[] ids);
}
